<HTML><HEAD><TITLE>lexico_le(+List1, +List2)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_global)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>lexico_le(+List1, +List2)</H1>
List1 is lexicographically less or equal to List2
<DL>
<DT><EM>List1</EM></DT>
<DD>List of integers or domain variables
</DD>
<DT><EM>List2</EM></DT>
<DD>List of integers or domain variables
</DD>
</DL>
<H2>Description</H2>
    	Imposes a lexicographic ordering between the two lists. 
	I.e.  either is the first element of List1 strictly smaller
	than the first element of List2, or the first elements are
	equal and the lexicographic order holds between the two list
	tails.
<H2>Examples</H2>
<PRE>    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]).		% X::0..2
    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]), X=2.	% Y::0..3
    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]), X#&gt;2.	% fail
    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]), X#&lt;2.	% true
    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]), Y=3.	% X::0..2
    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]), Y#&gt;3.	% X::0..1
    L=[X, Y, Z], L :: 0..9, lexico_le(L, [2, 3, 1]), Y#&lt;3.	% X::0..2
    lexico_le([2, 3, 1], [3]).					% true
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/ic_global/ordered-2.html">ordered / 2</A>
</BODY></HTML>
